//
//  ModifyProfileApi.m
//  SeaMelonSeeds_Counselor
//
//  Created by 杨笑 on 2017/9/14.
//  Copyright © 2017年 杨笑. All rights reserved.
//

#import "ModifyProfileApi.h"


@implementation ModifyProfileApi
{
    ConsultantInformation  *_info;
}

-(id)initWithInfo:(ConsultantInformation *)info{
    self = [super init];
    if (self) {
        _info = info;
    }
    return self;
}

-(id)requestArgument{
    NSMutableDictionary *mdict = [NSMutableDictionary new];
    if (_info.name) {
        [mdict setObject:_info.name forKey:@"name"];
    }
    if (_info.sex) {
        [mdict setObject:@(_info.sex) forKey:@"sex"];
    }
    if (_info.avatar) {
        [mdict setObject:_info.avatar forKey:@"avatar"];
    }
    if (_info.fields) {
        NSString *str = [_info.fields componentsJoinedByString:@","];
        [mdict setObject:str forKey:@"fields"];
    }
    if (_info.counselor_title) {
        [mdict setObject:@(_info.counselor_title) forKey:@"counselor_title"];
    }
    if (_info.hospital_title) {
        [mdict setObject:@(_info.hospital_title) forKey:@"hospital_title"];
    }
    if (_info.years) {
        [mdict setObject:@(_info.years) forKey:@"years"];
    }
    if (_info.summary) {
        [mdict setObject:_info.summary forKey:@"summary"];
    }
    if (_info.qualifications_up) {
        [mdict setObject:_info.qualifications_up forKey:@"qualifications_up"];
    }
    if (_info.qualifications_down) {
        [mdict setObject:_info.qualifications_down forKey:@"qualifications_down"];
    }
    return mdict;
}

-(NSString *)requestUrl{
    return @"counselor/modifyProfile";
}
-(YTKRequestMethod)requestMethod{
    return YTKRequestMethodPOST;
}
@end
